package com.example.lib_db.db.room.another

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface ShopDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertShop(shopLoveEntity: ShopLoveEntity):Long

    @Query("select * from shop where id=:id")
    fun selectShopById(id:Long): ShopLoveEntity

    @Query("select * from shop")
    fun selectShops():List<ShopLoveEntity>

    @Delete
    fun deleteShop(shopLoveEntity: ShopLoveEntity):Int


}